Optimal. Leaf size=69 \[ \frac {\log (a+b \tan (c+d x))}{b^3 d}-\frac {a^2+b^2}{2 b^3 d (a+b \tan (c+d x))^2}+\frac {2 a}{b^3 d (a+b \tan (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3587, 711}
\begin {gather*} -\frac {a^2+b^2}{2 b^3 d (a+b \tan (c+d x))^2}+\frac {2 a}{b^3 d (a+b \tan (c+d x))}+\frac {\log (a+b \tan (c+d x))}{b^3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 711
Rule 3587
Rubi steps
\begin {align*} \int \frac {\sec ^4(c+d x)}{(a+b \tan (c+d x))^3} \, dx &=\frac {\text {Subst}\left (\int \frac {1+\frac {x^2}{b^2}}{(a+x)^3} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {a^2+b^2}{b^2 (a+x)^3}-\frac {2 a}{b^2 (a+x)^2}+\frac {1}{b^2 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {\log (a+b \tan (c+d x))}{b^3 d}-\frac {a^2+b^2}{2 b^3 d (a+b \tan (c+d x))^2}+\frac {2 a}{b^3 d (a+b \tan (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.66, size = 115, normalized size = 1.67 \begin {gather*} -\frac {b^2 \sec ^2(c+d x)+2 (a+b \tan (c+d x)) (a (\log (\cos (c+d x))-\log (a \cos (c+d x)+b \sin (c+d x)))+b (1+\log (\cos (c+d x))-\log (a \cos (c+d x)+b \sin (c+d x))) \tan (c+d x))}{2 b^3 d (a+b \tan (c+d x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.35, size = 63, normalized size = 0.91
method | result | size |
derivativedivides | \(\frac {-\frac {a^{2}+b^{2}}{2 b^{3} \left (a +b \tan \left (d x +c \right )\right )^{2}}+\frac {2 a}{b^{3} \left (a +b \tan \left (d x +c \right )\right )}+\frac {\ln \left (a +b \tan \left (d x +c \right )\right )}{b^{3}}}{d}\) | \(63\) |
default | \(\frac {-\frac {a^{2}+b^{2}}{2 b^{3} \left (a +b \tan \left (d x +c \right )\right )^{2}}+\frac {2 a}{b^{3} \left (a +b \tan \left (d x +c \right )\right )}+\frac {\ln \left (a +b \tan \left (d x +c \right )\right )}{b^{3}}}{d}\) | \(63\) |
risch | \(\frac {-2 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+2 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+4 i a b \,{\mathrm e}^{2 i \left (d x +c \right )}-2 a^{2}-2 i a b}{b^{2} \left (i a +b \right ) \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+i a \,{\mathrm e}^{2 i \left (d x +c \right )}-b +i a \right )^{2} d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b^{3} d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{b^{3} d}\) | \(160\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 78, normalized size = 1.13 \begin {gather*} \frac {\frac {4 \, a b \tan \left (d x + c\right ) + 3 \, a^{2} - b^{2}}{b^{5} \tan \left (d x + c\right )^{2} + 2 \, a b^{4} \tan \left (d x + c\right ) + a^{2} b^{3}} + \frac {2 \, \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{3}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 284 vs.
\(2 (67) = 134\).
time = 0.41, size = 284, normalized size = 4.12 \begin {gather*} \frac {4 \, a^{2} b^{2} \cos \left (d x + c\right )^{2} - 3 \, a^{2} b^{2} - b^{4} - 2 \, {\left (a^{3} b - a b^{3}\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} b^{2} + b^{4} + {\left (a^{4} - b^{4}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{3} b + a b^{3}\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right )\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - {\left (a^{2} b^{2} + b^{4} + {\left (a^{4} - b^{4}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{3} b + a b^{3}\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2}\right )}{2 \, {\left ({\left (a^{4} b^{3} - b^{7}\right )} d \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{3} b^{4} + a b^{6}\right )} d \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} b^{5} + b^{7}\right )} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec ^{4}{\left (c + d x \right )}}{\left (a + b \tan {\left (c + d x \right )}\right )^{3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.64, size = 62, normalized size = 0.90 \begin {gather*} \frac {\frac {2 \, \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{3}} - \frac {3 \, b \tan \left (d x + c\right )^{2} + 2 \, a \tan \left (d x + c\right ) + b}{{\left (b \tan \left (d x + c\right ) + a\right )}^{2} b^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.75, size = 80, normalized size = 1.16 \begin {gather*} \frac {\frac {3\,a^2-b^2}{2\,b^3}+\frac {2\,a\,\mathrm {tan}\left (c+d\,x\right )}{b^2}}{d\,\left (a^2+2\,a\,b\,\mathrm {tan}\left (c+d\,x\right )+b^2\,{\mathrm {tan}\left (c+d\,x\right )}^2\right )}+\frac {\ln \left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}{b^3\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________